<%@ page language="java" pageEncoding="us-ascii" contentType="text/html;charset=us-ascii" %>
<%--Copyright (C) 2011 Wolfgang Hankeln, Norma J. Wendel
	 
	This file is part of CDinFusion.
	
	CDinFusion is free software: you can redistribute it and/or
	modify it under the terms of the GNU Lesser General Public 
	License in version 3 (LGPL3) as published by the Free Software
	Foundation version 3 of the License.
	
	CDinFusion is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
	Lesser General Public License for more details.
	
	You should have received a copy of the Lesser General Public
	License along with CDinFusion; see the file COPYING. If not,
	write to the Free Software Foundation, 59 Temple Place - Suite 330,
	Boston, MA 02111-1307, USA or see <http://www.gnu.org/licenses/>.
	
	If you have any questions, send an email to: megx@mpi-bremen.de.
--%>

<%@ page import="java.util.ArrayList" %>
<%@ page import="org.cdinfusion.data.*"%>
<%@ page import="org.cdinfusion.data.environment.*"%>
<%@ page import="org.cdinfusion.data.studytype.*"%>
<%@ page import="java.util.List"%>
<%System.out.println("<<<<<<<<<<6_END_DOWNLOAD>>>>>>>>>>");%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

<head>
<link rel="stylesheet" type="text/css" href="css/style.css">
<style type="text/css">
</style>
<title>FILE DOWNLOAD</title>
<jsp:include page="googleanalytics.jsp"/>

<script type="text/javascript"> 
	function openpopup(url){
		fenster=window.open(url, "_blank", "width=600,height=400,status=yes, scrollbars=yes, resizable=yes, toolbar=1, menubar=1, location=1");
		fenster.focus();
		return false;
	}
</script>
</head>

<body>
<table border="0" width="100%" bgcolor="#2B3990" cellpadding=0 cellspacing=0>
<tr bgcolor="#ffffff">
<td width=250>
<center>
<img height="81" width="250" alt="CDinFusion Logo" src="/CDinFusion/img/logo_small_dark.png">
</center>
</td>
</tr>

<tr align="left">    
<td>
<jsp:include page="documentation/navigation.jsp"></jsp:include>
</td>
</tr>
<%
String sessionID = request.getSession().getId();
String opt_2b = (String) session.getAttribute("opt_2b");
int max_Seqs = 10000;//max 10.000 sequences in Sequin
%>
<tr bgcolor="#ffffff">
<td>
<div class="center_div">
<br>
<center><b>Download merged files</b> <br><br>
Your FASTA sequences have successfully been merged with the corresponding contextual data entries you have created.<br>

Please download the contextual data enriched files and save them:<br>
<%-- submission to EMBL: [metadata.fasta] [metadata.object]<br> --%>

<form name="Formular" action="download_files.htm" method="post">
<%System.out.println("destination: download_files.htm");%>
<p>
submission to INSDC:
	<button class="submitbutton" style="height:28px;" name="submit" type="submit" value="FASTAFile"> <img src="/CDinFusion/img/disc_smaller.png" height="18" width="18" alt=""> FASTAFile </button>
	
	<%if(opt_2b.equals("one")){%>
		<button class="submitbutton" style="height:30px;" name="submit" type="submit" value="StructuredCommentFile"> <img src="/CDinFusion/img/disc_smaller.png" height="18" width="18" alt=""> StructuredCommentFile </button>
	<%}
	else if(opt_2b.equals("many")){%>
		<button class="submitbutton" style="height:30px;" name="submit" type="submit" value="StructuredCommentFile"> <img src="/CDinFusion/img/disc_smaller.png" height="18" width="18" alt=""> StructuredComment ZIP </button>
	<%}
	if(((Integer)session.getAttribute("numberOfSequencesUploaded")).intValue() > max_Seqs){%>
		<a href="warning.htm" target="_blank" onclick="openpopup(this.href); return false"> please read this </a>
	<%}%>
</p>
</form>

</center>
</div>
</td>
</tr>
<tr bgcolor="#ffffff"><td align="right" height=30>
	<img height="20" width="200" alt="CDinFusion Step 6" src="/CDinFusion/img/step6.png">
</td></tr>
<jsp:include page="documentation/bottom_info.jsp"></jsp:include>
</table>
</body>
</html>